package com.atguigu.jvm1205;

/**
 * @author gcq
 * @Create 2020-12-02
 */
public class RefCountCC {
    private byte[] bigSize = new byte[2 * 1024 * 1024];//这个成员属性的唯一作用就是占一点内存

    Object instance = null;

    public static void main(String[] args) {
        RefCountCC objectA = new RefCountCC();
        RefCountCC objectB = new RefCountCC();
        objectA.instance = objectB;
        objectB.instance = objectA;
        objectA = null;
        objectB = null;

        // 不会立刻执行
        System.gc();

    }
}